package com.haoan.index.common.enums;

import lombok.Getter;

/**
 * @Description: 门票上架状态
 */
@Getter
public enum ActivityStatusEnum {
    NEW("0", "新增", "上架状态-新增"),
    ON("1", "上架", "上架状态-上架"),
    OFF("2", "下架", "上架状态-下架"),
    NOT_FOUND("", "NULL", "NULL");

    private final String code;
    private final String name;
    private final String remark;

    ActivityStatusEnum(String code, String name, String remark) {
        this.code = code;
        this.name = name;
        this.remark = remark;
    }

    public static ActivityStatusEnum getByCode(String code) {
        for (ActivityStatusEnum demoEnum : ActivityStatusEnum.values()) {
            if (demoEnum.getCode().equals(code)) {
                return demoEnum;
            }
        }
        return NOT_FOUND;
    }

}
